package com.chuangjiangx.member.stored.ddd.domain.model;


/**
 * 赠送类型
 */
public enum MbrGiftType {
    CUSTOMIZE("自定义",(byte)-1),
    SCROE("赠送积分", (byte) 0),
    AMOUNT("赠送金额", (byte) 1),
    COUPON("赠送卡券",(byte) 2);

    public final String name;
    public final byte value;

    MbrGiftType(String name, byte value) {
        this.name = name;
        this.value = value;
    }


    public static MbrGiftType getGiftType(byte value) {
        for (MbrGiftType type : MbrGiftType.values()) {
            if (type.value == value) {
                return type;
            }
        }
        return null;
    }
}
